package com.iotechn.unimall.app.api.area;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.iotechn.unimall.data.domain.AreaDO;
import com.iotechn.unimall.data.mapper.AreaMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AreaServiceImpl implements AreaService {

    @Autowired
    private AreaMapper areaMapper;

    @Override
    public Object getAllArea() throws Exception {
        List<AreaDO> areaDOS = areaMapper.selectList(new EntityWrapper<AreaDO>().eq("parent_id", 1));
        return areaDOS;
    }
}
